#include "mainwindow.h"
#include <QApplication>
#include "login.h"
#include <mysql/mysql.h>
#include <stdio.h>

#include "inputusers.h"

std::string         g_token;
std::string         g_url;

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    setlocale(LC_ALL, "zh_CN.UTF8");
    // show login dialog
    Login*      login   = new Login;
    int         ret;

    ret = login->exec();
    printf("%d\n", ret);
    if(QDialog::Accepted != ret)
    {
        return -1;
    }

    delete login;

 //   InputUsers  input(4, "test");
  //  return input.exec();
    // show main window

    MainWindow w;
    w.show();
    
    return a.exec();
}
